Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using image parameters for preprocessing #14

Merged
merged 8 commits into from
Sep 30, 2024

Conversation

markotoplak
Copy link
Contributor

No description provided.

@markotoplak
Copy link
Contributor Author

@borondics, This now does something (labels are changed), and keeps image structure, so it is probably mostly OK.

See:

image

This was this PR + Quasars/pySNOM/pull/19

@markotoplak markotoplak marked this pull request as ready for review September 27, 2024 09:03
@markotoplak
Copy link
Contributor Author

This is done from my point of view. I also adapted two preprocessors to the new interface for demo. Please test and merge if OK.

def get_ndim_hyperspec(data, attrs):
# mostly copied from orangecontrib.spectroscopy.utils,
# but returns the indices too
# also avoid Orange domains as much as possible
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about this, is it faster? Should we just/also change the orangecontrib.spectroscopy.utils implementation? I think it used domains because get_column() didn't exist at that time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it because it seemed nicer to avoid domains where there are not needed. I do not expect any performance speedups, and yes, we could also do it in Spectroscopy.

@borondics
Copy link
Member

borondics commented Sep 30, 2024

@markotoplak thanks a lot! It mostly seems to work, but the BG Polyfit crashes. I sent the error report through Quasar. Could you have a look? Should we merge at this stage already?

@borondics
Copy link
Member

Also, there is a problem with the chunks, I think. Have a look at the picture below.
image

I think what happens is that the median which we use for the linelevel correction gets computed for the chunks not the whole image.

@markotoplak
Copy link
Contributor Author

Merging for now. I don't see a nice way to chunk this now, if operations work like this then chunking is probably a no-go.

@markotoplak markotoplak merged commit 47484c0 into Quasars:master Sep 30, 2024
4 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants